package com.shujia.wyh.day06;

/*
定义两个数组，分别输出数组名及元素。然后分别给数组中的元素赋值，分别再次输出数组名及元素。
 */
public class ArrayDemo3 {
    public static void main(String[] args) {
        //定义两个int类型的数组
        int[] arr1 = new int[3];
        int[] arr2 = new int[2];

        System.out.println(arr1);
        System.out.println(arr2);
        System.out.println(arr1[0]);
        System.out.println(arr1[1]);
        System.out.println(arr1[2]);
        System.out.println(arr2[0]);
        System.out.println(arr2[1]);
        //给第一个数组中的元素进行赋值
        arr1[0] = 11;
        arr1[1] = 22;
        arr1[2] = 33;
        //给第二个数组中的元素进行赋值
        arr2[0] = 100;
        arr2[1] = 200;
        System.out.println(arr1[0]);
        System.out.println(arr1[1]);
        System.out.println(arr1[2]);
        System.out.println(arr2[0]);
        System.out.println(arr2[1]);



    }
}
